<?php
//header("Content-Type: text/html; charset=UTF-8");
include "config.php";
//include "data/news_data.php";
include "util/functions.php";
//$SELECTED_MENU="menu-0";

//print ' 1  ';

session_start();
$mylink = mySqlOpen($mySQLserver, $mySQLuser, $mySQLpassword, $mySQLdefaultdb);

//print ' 2  ';

$new = getNews($_REQUEST['new_id']);

//print ' 3  ';

mySqlClose($mylink);

//print ' 4  ';
//print ' published:  '.$news['published'].'     ';
//print_r
if ($new['published'] != 0) {

//    print ' 5  ';
?>

<html>
<head>
<title>ООО "СитиМолПроект" - Современные технологии строительства и проэктирования- Главная</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="Современные технологии строительства и проектирования: новости, портфолио" name="description">
<meta content="строительство, проектирование, портфолио, новости" name="keywords">
<link href="css/style.css" type="text/css" rel="stylesheet">
</head>
<body>
<center>
<table width="1004" border="0">
	<tbody><tr>
		<td colspan="4">
		</td>
	</tr>
	<tr>
		<td colspan="4">
			<table width="1004"><tbody><tr height="1"><td width="1004" bgcolor="#244aa7"></td></tr></tbody></table>
		</td>
	</tr>
	<tr>
		<td colspan="4">
            <?php
            include "header.php";
            ?>
		</td>
	</tr>
	<tr>
		<td colspan="4">
            <?php
            include "main_menu.php";
            ?>
		</td>
	</tr>
	<tr>
		<td style="height: 100%;  " width="208">
            <?php
            include "left_menu.php";
            ?>
		</td>
		<td width="795">
			<table class="main">
				<tbody>
				<tr>
					<td width="600" style="padding: 20px;" >
						<table class="headermain">
							<tbody><tr>
								<td width="28"><img src="img/w_small3.jpg"></td>
								<td width="116">НОВОСТИ</td>
								<td width="2"></td>
							</tr>
						</tbody></table>
                        <br />
                        <p class="date2"><?php print arrayDateToWebFormDate($new['date']); ?></p>
                        <h1 class="content_header"><?php print htmlspecialchars($new["title"]); ?></h1>

            <?php   $image_file = 'upload/news/img_'.$new['id'].'.jpg';
                    if (file_exists($image_file)) {  ?>
                        <img src="<?php print $image_file.'?v='.$new['version']; ?>" alt="<?php print htmlspecialchars($new["title"]); ?>" class="image2">
            <?php   }?>
                        <?php print prepareNewsFullText(htmlspecialchars($new["full_text"])); ?>

                        <br/><br/>
                        <a href="news_list.php" class="occurrence">назад</a>
                        <br/>
					</td>
				</tr>
			</tbody></table>
		</td>
		<td width="1" bgcolor="#b2b2b2">
		</td>
		<td width="0">
		</td>

	</tr>
	<tr>
		<td colspan="4">
            <?php
            include "footer.php";
            ?>
		</td>
	</tr>
</tbody></table>
</center>

</body></html>

<?php
} else {
//    print ' XYI  ';
}
?>